doctype
html
  head
    meta(charset="utf-8")
    meta(name="viewport" content="width=device-width, initial-scale=1")
    title #{title}
    <link rel="shortcut  icon" type="image/x-icon" href="/images/favicon.ico" media="screen"  />
    include ./includes/head
  body
    .top_bar
      p.top_bar_p 欢迎来到内农大商层 &nbsp;&nbsp;&nbsp;&nbsp;+15754885016
      if user
        if user.role == 'vip'
          .login
              span(style="display:inline;color:white;") 欢迎您尊贵的至尊VIP, #{user.name}
              span(style="display:inline;color:white;") &nbsp;|&nbsp;
              a.nvabar-link(href="/logout" style="display:inline;color:white;") 登出
              span &nbsp;|&nbsp;
              a.nvabar-link(href="/daijinquan" style="display:inline;color:red;") 查看我的代金券
        else if user.role == 'nomal'
          .login
              span(style="display:inline;color:white;") 欢迎您, #{user.name}
              span(style="display:inline;color:white;") &nbsp;|&nbsp;
              a.nvabar-link(href="/logout" style="display:inline;color:white;") 登出
              span &nbsp;|&nbsp;
              a.nvabar-link(href="/daijinquan" style="display:inline;color:red;") 查看我的代金券
        else if user.role == 'admin'
          .login
              span(style="display:inline;color:white;") 欢迎您管理员, #{user.name}
              span(style="display:inline;color:white;") &nbsp;|&nbsp;
              a.nvabar-link(href="/logout" style="display:inline;color:white;") 登出
              span &nbsp;|&nbsp;
              a.nvabar-link(href="/admin" style="display:inline;color:red;") 进入后台管理系统
      else
        .login
          a.nvabar-link(href="/signup" style="display:inline;color:white;") 注册
          span &nbsp;|&nbsp;
          a.nvabar-link(href="/signin" style="display:inline;color:white;") 登录
    .connect
      .shopimag
        img(src="/images/logo.png", alt="")
        img.logo2(src="/images/logo2.png", alt="")
      .freepass
        img(src="/images/freepass.png", alt="")
    block content